<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-on-params-and-keyup</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

</head>
<body>
    <div id="app">
      <input type="button" @click="doit(this)" value="带参数">
      <input type="text" @keyup.enter="sayhi" value="看回车">
    </div> 

</body>
</html>

<script>
    var app = new Vue({
  el: '#app',
  data: {
  },
  methods:{
    doit:function(e){
      console.log(e);
    },
    sayhi:function(){
      console.log('哈哈哈');
    }
  }
})
</script>